
# see: http://docs.djangoproject.com/en/1.1/topics/forms/modelforms/

from django.forms import ModelForm
from entelib.news.models import News

# Create the form class.
class NewsForm(ModelForm):
    class Meta:
        model = News

# Creating a form to add an article.
form = NewsForm()
print form

print

# Creating a form to change an existing article.
news = News.objects.get(pk=2)
form = NewsForm(instance=news)
print form
